home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / ADSPSecure.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  4.7 KB  |  129 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ADSPSecure.a
  3. ;
  4. ;    Contains:    Secure AppleTalk Data Stream Protocol Interfaces.
  5. ;
  6. ;    Version:    Technology:    AOCE Toolbox 1.02
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__ADSPSECURE__') = 'UNDEFINED' THEN
  21. __ADSPSECURE__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  25.     include 'Events.a'
  26.     ENDIF
  27. ;        include 'Types.a'                                            ;
  28. ;            include 'ConditionalMacros.a'                            ;
  29. ;        include 'Quickdraw.a'                                        ;
  30. ;            include 'MixedMode.a'                                    ;
  31. ;            include 'QuickdrawText.a'                                ;
  32. ;        include 'OSUtils.a'                                        ;
  33. ;            include 'Memory.a'                                        ;
  34.  
  35.     IF &TYPE('__NOTIFICATION__') = 'UNDEFINED' THEN
  36.     include 'Notification.a'
  37.     ENDIF
  38.  
  39.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  40.     include 'AppleEvents.a'
  41.     ENDIF
  42. ;        include 'Errors.a'                                            ;
  43. ;        include 'EPPC.a'                                            ;
  44. ;            include 'AppleTalk.a'                                    ;
  45. ;            include 'Files.a'                                        ;
  46. ;                include 'Finder.a'                                    ;
  47. ;            include 'PPCToolbox.a'                                    ;
  48. ;            include 'Processes.a'                                    ;
  49.  
  50.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  51.     include 'Types.a'
  52.     ENDIF
  53.  
  54.     IF &TYPE('__ADSP__') = 'UNDEFINED' THEN
  55.     include 'ADSP.a'
  56.     ENDIF
  57.  
  58.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  59.     include 'Files.a'
  60.     ENDIF
  61.  
  62.     IF &TYPE('__OCE__') = 'UNDEFINED' THEN
  63.     include 'OCE.a'
  64.     ENDIF
  65. ;        include 'Aliases.a'                                        ;
  66. ;        include 'Script.a'                                            ;
  67. ;            include 'IntlResources.a'                                ;
  68.  
  69.     IF &TYPE('__OCEAUTHDIR__') = 'UNDEFINED' THEN
  70.     include 'OCEAuthDir.a'
  71.     ENDIF
  72.  
  73. sdspOpen                        EQU        229
  74.  
  75. ;
  76. ;For secure connections, the eom field of ioParams contains two single-bit flags
  77. ;(instead of a zero/non-zero byte). They are an encrypt flag (see below), and an
  78. ;eom flag.  All other bits in that field should be zero.
  79. ;
  80. ;To write an encrypted message, you must set an encrypt bit in the eom field of
  81. ;the ioParams of your write call. Note: this flag is only checked on the first
  82. ;write of a message (the first write on a connection, or the first write following
  83. ;a write with eom set.
  84. ;
  85. dspEOMBit                        EQU        0                    ; set if EOM at end of write 
  86. dspEncryptBit                    EQU        1                    ; set to encrypt message 
  87.  
  88. dspEOMMask                        EQU        1
  89. dspEncryptMask                    EQU        2
  90.  
  91. sdspWorkSize                    EQU        2048
  92.  
  93. TRSecureParams             RECORD    0
  94. localCID                 ds.w   1        ; offset: $0 (0)        ; local connection id 
  95. remoteCID                 ds.w   1        ; offset: $2 (2)        ; remote connection id 
  96. remoteAddress             ds     AddrBlock ; offset: $4 (4)        ; address of remote end 
  97. filterAddress             ds     AddrBlock ; offset: $8 (8)        ; address filter 
  98. sendSeq                     ds.l   1        ; offset: $C (12)        ; local send sequence number 
  99. sendWindow                 ds.w   1        ; offset: $10 (16)        ; send window size 
  100. recvSeq                     ds.l   1        ; offset: $12 (18)        ; receive sequence number 
  101. attnSendSeq                 ds.l   1        ; offset: $16 (22)        ; attention send sequence number 
  102. attnRecvSeq                 ds.l   1        ; offset: $1A (26)        ; attention receive sequence number 
  103. ocMode                     ds.b   1        ; offset: $1E (30)        ; open connection mode 
  104. ocInterval                 ds.b   1        ; offset: $1F (31)        ; open connection request retry interval 
  105. ocMaximum                 ds.b   1        ; offset: $20 (32)        ; open connection request retry maximum 
  106. secure                     ds.b   1        ; offset: $21 (33)        ;  --> TRUE if session was authenticated 
  107. sessionKey                 ds.l   1        ; offset: $22 (34)        ; <--> encryption key for session 
  108. credentialsSize             ds.l   1        ; offset: $26 (38)        ;  --> length of credentials 
  109. credentials                 ds.l   1        ; offset: $2A (42)        ;  --> pointer to credentials 
  110. workspace                 ds.l   1        ; offset: $2E (46)        ;  --> pointer to workspace for connection
  111. ;                                           align on even boundary and length = sdspWorkSize 
  112. recipient                 ds.l   1        ; offset: $32 (50)        ;  --> identity of recipient (or initiator if active mode 
  113. issueTime                 ds.l   1        ; offset: $36 (54)        ;  --> when credentials were issued 
  114. expiry                     ds.l   1        ; offset: $3A (58)        ;  --> when credentials expiry 
  115. initiator                 ds.l   1        ; offset: $3E (62)        ; <--  RecordID of initiator returned here.
  116. ;                                            Must give appropriate Buffer to hold RecordID
  117. ;                                            (Only for passive or accept mode) 
  118. hasIntermediary             ds.b   1        ; offset: $42 (66)        ; <--  will be set if credentials has an intermediary 
  119. filler1                     ds.b   1        ; offset: $43 (67)
  120. intermediary             ds.l   1        ; offset: $44 (68)        ; <--  RecordID of intermediary returned here.
  121. ;                                            (If intermediary is found in credentials
  122. ;                                            Must give appropriate Buffer to hold RecordID
  123. ;                                            (Only for passive or accept mode) 
  124. sizeof                     EQU *            ; size:   $48 (72)
  125.                         ENDR
  126.  
  127. ; typedef struct TRSecureParams  TRSecureParams
  128.     ENDIF ; __ADSPSECURE__
  129.